﻿using System.ComponentModel;

namespace FolderDrive.ViewModels
{
  public abstract class BaseViewModel : INotifyPropertyChanged
  {
    public event PropertyChangedEventHandler PropertyChanged;

    /// <summary>
    /// Notifies the changed property name via PropertyChanged event.
    /// </summary>
    /// <param name="property">The property.</param>
    protected void NotifyChanged(string property)
    {
      if (PropertyChanged != null)
      {
        PropertyChanged(this, new PropertyChangedEventArgs(property));
      }
    }
  }
}